<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <style>
 

    .box {
      width: 400px;
      height: 500px;
      background-image: url(images/pg1.png) no-repeat ;
      background-position: center center;

      background: yellow;
    }

    /* 
        background-attachment:背景图是否固定  scroll 滚动 默认值
                 fixed 固定，不随内容一起进行滚动，可视窗口
        */
  </style>
</head>

<body>
  <div class="box">
    登录 注册
  </div>
</body>

</html>